function that works only once...
От | Niclas Hedell |
---|---|
Тема | function that works only once... |
Дата | |
Msg-id | p05200f00bb4eddd96115@[192.168.0.37] обсуждение исходный текст |
Ответы |
Re: function that works only once...
|
Список | pgsql-novice |
Hi list,
I've a strange problem here that someone might know the answer to. I have a function in plpgsql that works only the first time after creating (installing) the function. After that I get the following error:
Fatal - ERROR: pg_class_aclcheck: relation 51755 not found
I've tried to find pg_class_aclcheck in pg_class but it's not there. Here is my function:
create or replace function display_attributes(varchar) returns varchar as '
declare
classNameVar alias for $1;
query_string text;
tablename varchar(20);
begin
query_string := ''create view the_groupview as select * from getattribute('' || quote_literal(classNameVar) || '')'';
execute query_string;
select into tablename the_tablename from the_groupview;
drop view the_groupview;
return tablename;
end;'
declare
classNameVar alias for $1;
query_string text;
tablename varchar(20);
begin
query_string := ''create view the_groupview as select * from getattribute('' || quote_literal(classNameVar) || '')'';
execute query_string;
select into tablename the_tablename from the_groupview;
drop view the_groupview;
return tablename;
end;'
language 'plpgsql' with (isstrict);
Thanx in advance! :-)
Cheers,
Nick
В списке pgsql-novice по дате отправления: